// -----------------------------------------------------------------------
//  <copyright file="EntityResourceMetadata.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2025 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025-03-07 21:03</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Authorization;

/// <summary>
/// 实体信息
/// </summary>
public class EntityMetadata
{
    public string TypeName { get; set; } = null!;

    public bool AuditEnabled { get; set; } = true;

    public EntityProperty[] Properties { get; set; } = null!;
}

/// <summary>
/// 实体属性信息
/// </summary>
public class EntityProperty
{
    /// <summary>
    /// 获取或设置 属性名
    /// </summary>
    public string Name { get; set; } = null!;

    /// <summary>
    /// 获取或设置 属性显示
    /// </summary>
    public string Display { get; set; } = null!;

    /// <summary>
    /// 获取或设置 属性数据类型
    /// </summary>
    public string TypeName { get; set; } = null!;

    /// <summary>
    /// 获取或设置 数据值范围集合（主要针对枚举类型）
    /// </summary>
    public List<object> ValueRange { get; } = new();
}
